#pragma once
// MESSAGE BEACON_REQUEST PACKING

#define MAVLINK_MSG_ID_BEACON_REQUEST 170

MAVPACKED(
typedef struct __mavlink_beacon_request_t {
 float dvb_freq; /*<  dvb frequency(ka.MHz).*/
 uint32_t dvb_symb; /*<  dvb symbol rate.*/
 uint32_t dvb_rng; /*<  dvb range.*/
 float beacon_freq; /*<  beacon frequency(ka.MHz).*/
 float radio_freq; /*<  radio frequency(ka.MHz).*/
 uint32_t radio_symb; /*<  radio symbol rate.*/
 uint16_t radio_scan_rng; /*<  radio scan range.*/
 uint8_t cmd; /*<  Request the params of beacon at dvb/beacon/radio mode.*/
 uint8_t dvb_feed_volt; /*<  dvb feed volt.*/
 uint8_t dvb_22k; /*<  dvb 22k.*/
 uint8_t dvb_period; /*<  dvb period.*/
 uint8_t dvb_id; /*<  dvb period.*/
 uint8_t dvb_mcod; /*<  dvb mode code.*/
 uint8_t dvb_roll; /*<  dvb roll.*/
 uint8_t dvb_std; /*<  dvb standard code.*/
 uint8_t dvb_alg; /*<  dvb algorithm.*/
 uint8_t dvb_pr; /*<  dvb punch rate.*/
 uint8_t beacon_feed_volt; /*<  beacon feed volt.*/
 uint8_t beacon_22k; /*<  beacon 22k.*/
 uint8_t beacon_period; /*<  beacon period.*/
 uint8_t beacon_rng; /*<  beacon range.*/
 uint8_t radio_feed_volt; /*<  radio feed volt.*/
 uint8_t radio_22k; /*<  radio 22k.*/
 uint8_t radio_period; /*<  radio period.*/
 uint8_t radio_roll; /*<  radio roll.*/
}) mavlink_beacon_request_t;

#define MAVLINK_MSG_ID_BEACON_REQUEST_LEN 44
#define MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN 44
#define MAVLINK_MSG_ID_170_LEN 44
#define MAVLINK_MSG_ID_170_MIN_LEN 44

#define MAVLINK_MSG_ID_BEACON_REQUEST_CRC 121
#define MAVLINK_MSG_ID_170_CRC 121



#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_BEACON_REQUEST { \
    170, \
    "BEACON_REQUEST", \
    25, \
    {  { "cmd", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_beacon_request_t, cmd) }, \
         { "dvb_feed_volt", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_beacon_request_t, dvb_feed_volt) }, \
         { "dvb_22k", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_beacon_request_t, dvb_22k) }, \
         { "dvb_period", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_beacon_request_t, dvb_period) }, \
         { "dvb_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_beacon_request_t, dvb_id) }, \
         { "dvb_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_beacon_request_t, dvb_freq) }, \
         { "dvb_symb", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_beacon_request_t, dvb_symb) }, \
         { "dvb_rng", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_beacon_request_t, dvb_rng) }, \
         { "dvb_mcod", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_beacon_request_t, dvb_mcod) }, \
         { "dvb_roll", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_beacon_request_t, dvb_roll) }, \
         { "dvb_std", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_beacon_request_t, dvb_std) }, \
         { "dvb_alg", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_beacon_request_t, dvb_alg) }, \
         { "dvb_pr", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_beacon_request_t, dvb_pr) }, \
         { "beacon_feed_volt", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_beacon_request_t, beacon_feed_volt) }, \
         { "beacon_22k", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_beacon_request_t, beacon_22k) }, \
         { "beacon_period", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_beacon_request_t, beacon_period) }, \
         { "beacon_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_beacon_request_t, beacon_freq) }, \
         { "beacon_rng", NULL, MAVLINK_TYPE_UINT8_T, 0, 39, offsetof(mavlink_beacon_request_t, beacon_rng) }, \
         { "radio_feed_volt", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_beacon_request_t, radio_feed_volt) }, \
         { "radio_22k", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_beacon_request_t, radio_22k) }, \
         { "radio_period", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_beacon_request_t, radio_period) }, \
         { "radio_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_beacon_request_t, radio_freq) }, \
         { "radio_symb", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_beacon_request_t, radio_symb) }, \
         { "radio_scan_rng", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_beacon_request_t, radio_scan_rng) }, \
         { "radio_roll", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_beacon_request_t, radio_roll) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_BEACON_REQUEST { \
    "BEACON_REQUEST", \
    25, \
    {  { "cmd", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_beacon_request_t, cmd) }, \
         { "dvb_feed_volt", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_beacon_request_t, dvb_feed_volt) }, \
         { "dvb_22k", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_beacon_request_t, dvb_22k) }, \
         { "dvb_period", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_beacon_request_t, dvb_period) }, \
         { "dvb_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_beacon_request_t, dvb_id) }, \
         { "dvb_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_beacon_request_t, dvb_freq) }, \
         { "dvb_symb", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_beacon_request_t, dvb_symb) }, \
         { "dvb_rng", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_beacon_request_t, dvb_rng) }, \
         { "dvb_mcod", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_beacon_request_t, dvb_mcod) }, \
         { "dvb_roll", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_beacon_request_t, dvb_roll) }, \
         { "dvb_std", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_beacon_request_t, dvb_std) }, \
         { "dvb_alg", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_beacon_request_t, dvb_alg) }, \
         { "dvb_pr", NULL, MAVLINK_TYPE_UINT8_T, 0, 35, offsetof(mavlink_beacon_request_t, dvb_pr) }, \
         { "beacon_feed_volt", NULL, MAVLINK_TYPE_UINT8_T, 0, 36, offsetof(mavlink_beacon_request_t, beacon_feed_volt) }, \
         { "beacon_22k", NULL, MAVLINK_TYPE_UINT8_T, 0, 37, offsetof(mavlink_beacon_request_t, beacon_22k) }, \
         { "beacon_period", NULL, MAVLINK_TYPE_UINT8_T, 0, 38, offsetof(mavlink_beacon_request_t, beacon_period) }, \
         { "beacon_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_beacon_request_t, beacon_freq) }, \
         { "beacon_rng", NULL, MAVLINK_TYPE_UINT8_T, 0, 39, offsetof(mavlink_beacon_request_t, beacon_rng) }, \
         { "radio_feed_volt", NULL, MAVLINK_TYPE_UINT8_T, 0, 40, offsetof(mavlink_beacon_request_t, radio_feed_volt) }, \
         { "radio_22k", NULL, MAVLINK_TYPE_UINT8_T, 0, 41, offsetof(mavlink_beacon_request_t, radio_22k) }, \
         { "radio_period", NULL, MAVLINK_TYPE_UINT8_T, 0, 42, offsetof(mavlink_beacon_request_t, radio_period) }, \
         { "radio_freq", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_beacon_request_t, radio_freq) }, \
         { "radio_symb", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_beacon_request_t, radio_symb) }, \
         { "radio_scan_rng", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_beacon_request_t, radio_scan_rng) }, \
         { "radio_roll", NULL, MAVLINK_TYPE_UINT8_T, 0, 43, offsetof(mavlink_beacon_request_t, radio_roll) }, \
         } \
}
#endif

/**
 * @brief Pack a beacon_request message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param cmd  Request the params of beacon at dvb/beacon/radio mode.
 * @param dvb_feed_volt  dvb feed volt.
 * @param dvb_22k  dvb 22k.
 * @param dvb_period  dvb period.
 * @param dvb_id  dvb period.
 * @param dvb_freq  dvb frequency(ka.MHz).
 * @param dvb_symb  dvb symbol rate.
 * @param dvb_rng  dvb range.
 * @param dvb_mcod  dvb mode code.
 * @param dvb_roll  dvb roll.
 * @param dvb_std  dvb standard code.
 * @param dvb_alg  dvb algorithm.
 * @param dvb_pr  dvb punch rate.
 * @param beacon_feed_volt  beacon feed volt.
 * @param beacon_22k  beacon 22k.
 * @param beacon_period  beacon period.
 * @param beacon_freq  beacon frequency(ka.MHz).
 * @param beacon_rng  beacon range.
 * @param radio_feed_volt  radio feed volt.
 * @param radio_22k  radio 22k.
 * @param radio_period  radio period.
 * @param radio_freq  radio frequency(ka.MHz).
 * @param radio_symb  radio symbol rate.
 * @param radio_scan_rng  radio scan range.
 * @param radio_roll  radio roll.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_beacon_request_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint8_t cmd, uint8_t dvb_feed_volt, uint8_t dvb_22k, uint8_t dvb_period, uint8_t dvb_id, float dvb_freq, uint32_t dvb_symb, uint32_t dvb_rng, uint8_t dvb_mcod, uint8_t dvb_roll, uint8_t dvb_std, uint8_t dvb_alg, uint8_t dvb_pr, uint8_t beacon_feed_volt, uint8_t beacon_22k, uint8_t beacon_period, float beacon_freq, uint8_t beacon_rng, uint8_t radio_feed_volt, uint8_t radio_22k, uint8_t radio_period, float radio_freq, uint32_t radio_symb, uint16_t radio_scan_rng, uint8_t radio_roll)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_BEACON_REQUEST_LEN];
    _mav_put_float(buf, 0, dvb_freq);
    _mav_put_uint32_t(buf, 4, dvb_symb);
    _mav_put_uint32_t(buf, 8, dvb_rng);
    _mav_put_float(buf, 12, beacon_freq);
    _mav_put_float(buf, 16, radio_freq);
    _mav_put_uint32_t(buf, 20, radio_symb);
    _mav_put_uint16_t(buf, 24, radio_scan_rng);
    _mav_put_uint8_t(buf, 26, cmd);
    _mav_put_uint8_t(buf, 27, dvb_feed_volt);
    _mav_put_uint8_t(buf, 28, dvb_22k);
    _mav_put_uint8_t(buf, 29, dvb_period);
    _mav_put_uint8_t(buf, 30, dvb_id);
    _mav_put_uint8_t(buf, 31, dvb_mcod);
    _mav_put_uint8_t(buf, 32, dvb_roll);
    _mav_put_uint8_t(buf, 33, dvb_std);
    _mav_put_uint8_t(buf, 34, dvb_alg);
    _mav_put_uint8_t(buf, 35, dvb_pr);
    _mav_put_uint8_t(buf, 36, beacon_feed_volt);
    _mav_put_uint8_t(buf, 37, beacon_22k);
    _mav_put_uint8_t(buf, 38, beacon_period);
    _mav_put_uint8_t(buf, 39, beacon_rng);
    _mav_put_uint8_t(buf, 40, radio_feed_volt);
    _mav_put_uint8_t(buf, 41, radio_22k);
    _mav_put_uint8_t(buf, 42, radio_period);
    _mav_put_uint8_t(buf, 43, radio_roll);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BEACON_REQUEST_LEN);
#else
    mavlink_beacon_request_t packet;
    packet.dvb_freq = dvb_freq;
    packet.dvb_symb = dvb_symb;
    packet.dvb_rng = dvb_rng;
    packet.beacon_freq = beacon_freq;
    packet.radio_freq = radio_freq;
    packet.radio_symb = radio_symb;
    packet.radio_scan_rng = radio_scan_rng;
    packet.cmd = cmd;
    packet.dvb_feed_volt = dvb_feed_volt;
    packet.dvb_22k = dvb_22k;
    packet.dvb_period = dvb_period;
    packet.dvb_id = dvb_id;
    packet.dvb_mcod = dvb_mcod;
    packet.dvb_roll = dvb_roll;
    packet.dvb_std = dvb_std;
    packet.dvb_alg = dvb_alg;
    packet.dvb_pr = dvb_pr;
    packet.beacon_feed_volt = beacon_feed_volt;
    packet.beacon_22k = beacon_22k;
    packet.beacon_period = beacon_period;
    packet.beacon_rng = beacon_rng;
    packet.radio_feed_volt = radio_feed_volt;
    packet.radio_22k = radio_22k;
    packet.radio_period = radio_period;
    packet.radio_roll = radio_roll;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BEACON_REQUEST_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_BEACON_REQUEST;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_CRC);
}

/**
 * @brief Pack a beacon_request message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param cmd  Request the params of beacon at dvb/beacon/radio mode.
 * @param dvb_feed_volt  dvb feed volt.
 * @param dvb_22k  dvb 22k.
 * @param dvb_period  dvb period.
 * @param dvb_id  dvb period.
 * @param dvb_freq  dvb frequency(ka.MHz).
 * @param dvb_symb  dvb symbol rate.
 * @param dvb_rng  dvb range.
 * @param dvb_mcod  dvb mode code.
 * @param dvb_roll  dvb roll.
 * @param dvb_std  dvb standard code.
 * @param dvb_alg  dvb algorithm.
 * @param dvb_pr  dvb punch rate.
 * @param beacon_feed_volt  beacon feed volt.
 * @param beacon_22k  beacon 22k.
 * @param beacon_period  beacon period.
 * @param beacon_freq  beacon frequency(ka.MHz).
 * @param beacon_rng  beacon range.
 * @param radio_feed_volt  radio feed volt.
 * @param radio_22k  radio 22k.
 * @param radio_period  radio period.
 * @param radio_freq  radio frequency(ka.MHz).
 * @param radio_symb  radio symbol rate.
 * @param radio_scan_rng  radio scan range.
 * @param radio_roll  radio roll.
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_beacon_request_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint8_t cmd,uint8_t dvb_feed_volt,uint8_t dvb_22k,uint8_t dvb_period,uint8_t dvb_id,float dvb_freq,uint32_t dvb_symb,uint32_t dvb_rng,uint8_t dvb_mcod,uint8_t dvb_roll,uint8_t dvb_std,uint8_t dvb_alg,uint8_t dvb_pr,uint8_t beacon_feed_volt,uint8_t beacon_22k,uint8_t beacon_period,float beacon_freq,uint8_t beacon_rng,uint8_t radio_feed_volt,uint8_t radio_22k,uint8_t radio_period,float radio_freq,uint32_t radio_symb,uint16_t radio_scan_rng,uint8_t radio_roll)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_BEACON_REQUEST_LEN];
    _mav_put_float(buf, 0, dvb_freq);
    _mav_put_uint32_t(buf, 4, dvb_symb);
    _mav_put_uint32_t(buf, 8, dvb_rng);
    _mav_put_float(buf, 12, beacon_freq);
    _mav_put_float(buf, 16, radio_freq);
    _mav_put_uint32_t(buf, 20, radio_symb);
    _mav_put_uint16_t(buf, 24, radio_scan_rng);
    _mav_put_uint8_t(buf, 26, cmd);
    _mav_put_uint8_t(buf, 27, dvb_feed_volt);
    _mav_put_uint8_t(buf, 28, dvb_22k);
    _mav_put_uint8_t(buf, 29, dvb_period);
    _mav_put_uint8_t(buf, 30, dvb_id);
    _mav_put_uint8_t(buf, 31, dvb_mcod);
    _mav_put_uint8_t(buf, 32, dvb_roll);
    _mav_put_uint8_t(buf, 33, dvb_std);
    _mav_put_uint8_t(buf, 34, dvb_alg);
    _mav_put_uint8_t(buf, 35, dvb_pr);
    _mav_put_uint8_t(buf, 36, beacon_feed_volt);
    _mav_put_uint8_t(buf, 37, beacon_22k);
    _mav_put_uint8_t(buf, 38, beacon_period);
    _mav_put_uint8_t(buf, 39, beacon_rng);
    _mav_put_uint8_t(buf, 40, radio_feed_volt);
    _mav_put_uint8_t(buf, 41, radio_22k);
    _mav_put_uint8_t(buf, 42, radio_period);
    _mav_put_uint8_t(buf, 43, radio_roll);

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_BEACON_REQUEST_LEN);
#else
    mavlink_beacon_request_t packet;
    packet.dvb_freq = dvb_freq;
    packet.dvb_symb = dvb_symb;
    packet.dvb_rng = dvb_rng;
    packet.beacon_freq = beacon_freq;
    packet.radio_freq = radio_freq;
    packet.radio_symb = radio_symb;
    packet.radio_scan_rng = radio_scan_rng;
    packet.cmd = cmd;
    packet.dvb_feed_volt = dvb_feed_volt;
    packet.dvb_22k = dvb_22k;
    packet.dvb_period = dvb_period;
    packet.dvb_id = dvb_id;
    packet.dvb_mcod = dvb_mcod;
    packet.dvb_roll = dvb_roll;
    packet.dvb_std = dvb_std;
    packet.dvb_alg = dvb_alg;
    packet.dvb_pr = dvb_pr;
    packet.beacon_feed_volt = beacon_feed_volt;
    packet.beacon_22k = beacon_22k;
    packet.beacon_period = beacon_period;
    packet.beacon_rng = beacon_rng;
    packet.radio_feed_volt = radio_feed_volt;
    packet.radio_22k = radio_22k;
    packet.radio_period = radio_period;
    packet.radio_roll = radio_roll;

        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_BEACON_REQUEST_LEN);
#endif

    msg->msgid = MAVLINK_MSG_ID_BEACON_REQUEST;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_CRC);
}

/**
 * @brief Encode a beacon_request struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param beacon_request C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_beacon_request_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_beacon_request_t* beacon_request)
{
    return mavlink_msg_beacon_request_pack(system_id, component_id, msg, beacon_request->cmd, beacon_request->dvb_feed_volt, beacon_request->dvb_22k, beacon_request->dvb_period, beacon_request->dvb_id, beacon_request->dvb_freq, beacon_request->dvb_symb, beacon_request->dvb_rng, beacon_request->dvb_mcod, beacon_request->dvb_roll, beacon_request->dvb_std, beacon_request->dvb_alg, beacon_request->dvb_pr, beacon_request->beacon_feed_volt, beacon_request->beacon_22k, beacon_request->beacon_period, beacon_request->beacon_freq, beacon_request->beacon_rng, beacon_request->radio_feed_volt, beacon_request->radio_22k, beacon_request->radio_period, beacon_request->radio_freq, beacon_request->radio_symb, beacon_request->radio_scan_rng, beacon_request->radio_roll);
}

/**
 * @brief Encode a beacon_request struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param beacon_request C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_beacon_request_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_beacon_request_t* beacon_request)
{
    return mavlink_msg_beacon_request_pack_chan(system_id, component_id, chan, msg, beacon_request->cmd, beacon_request->dvb_feed_volt, beacon_request->dvb_22k, beacon_request->dvb_period, beacon_request->dvb_id, beacon_request->dvb_freq, beacon_request->dvb_symb, beacon_request->dvb_rng, beacon_request->dvb_mcod, beacon_request->dvb_roll, beacon_request->dvb_std, beacon_request->dvb_alg, beacon_request->dvb_pr, beacon_request->beacon_feed_volt, beacon_request->beacon_22k, beacon_request->beacon_period, beacon_request->beacon_freq, beacon_request->beacon_rng, beacon_request->radio_feed_volt, beacon_request->radio_22k, beacon_request->radio_period, beacon_request->radio_freq, beacon_request->radio_symb, beacon_request->radio_scan_rng, beacon_request->radio_roll);
}

/**
 * @brief Send a beacon_request message
 * @param chan MAVLink channel to send the message
 *
 * @param cmd  Request the params of beacon at dvb/beacon/radio mode.
 * @param dvb_feed_volt  dvb feed volt.
 * @param dvb_22k  dvb 22k.
 * @param dvb_period  dvb period.
 * @param dvb_id  dvb period.
 * @param dvb_freq  dvb frequency(ka.MHz).
 * @param dvb_symb  dvb symbol rate.
 * @param dvb_rng  dvb range.
 * @param dvb_mcod  dvb mode code.
 * @param dvb_roll  dvb roll.
 * @param dvb_std  dvb standard code.
 * @param dvb_alg  dvb algorithm.
 * @param dvb_pr  dvb punch rate.
 * @param beacon_feed_volt  beacon feed volt.
 * @param beacon_22k  beacon 22k.
 * @param beacon_period  beacon period.
 * @param beacon_freq  beacon frequency(ka.MHz).
 * @param beacon_rng  beacon range.
 * @param radio_feed_volt  radio feed volt.
 * @param radio_22k  radio 22k.
 * @param radio_period  radio period.
 * @param radio_freq  radio frequency(ka.MHz).
 * @param radio_symb  radio symbol rate.
 * @param radio_scan_rng  radio scan range.
 * @param radio_roll  radio roll.
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS

static inline void mavlink_msg_beacon_request_send(mavlink_channel_t chan, uint8_t cmd, uint8_t dvb_feed_volt, uint8_t dvb_22k, uint8_t dvb_period, uint8_t dvb_id, float dvb_freq, uint32_t dvb_symb, uint32_t dvb_rng, uint8_t dvb_mcod, uint8_t dvb_roll, uint8_t dvb_std, uint8_t dvb_alg, uint8_t dvb_pr, uint8_t beacon_feed_volt, uint8_t beacon_22k, uint8_t beacon_period, float beacon_freq, uint8_t beacon_rng, uint8_t radio_feed_volt, uint8_t radio_22k, uint8_t radio_period, float radio_freq, uint32_t radio_symb, uint16_t radio_scan_rng, uint8_t radio_roll)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_BEACON_REQUEST_LEN];
    _mav_put_float(buf, 0, dvb_freq);
    _mav_put_uint32_t(buf, 4, dvb_symb);
    _mav_put_uint32_t(buf, 8, dvb_rng);
    _mav_put_float(buf, 12, beacon_freq);
    _mav_put_float(buf, 16, radio_freq);
    _mav_put_uint32_t(buf, 20, radio_symb);
    _mav_put_uint16_t(buf, 24, radio_scan_rng);
    _mav_put_uint8_t(buf, 26, cmd);
    _mav_put_uint8_t(buf, 27, dvb_feed_volt);
    _mav_put_uint8_t(buf, 28, dvb_22k);
    _mav_put_uint8_t(buf, 29, dvb_period);
    _mav_put_uint8_t(buf, 30, dvb_id);
    _mav_put_uint8_t(buf, 31, dvb_mcod);
    _mav_put_uint8_t(buf, 32, dvb_roll);
    _mav_put_uint8_t(buf, 33, dvb_std);
    _mav_put_uint8_t(buf, 34, dvb_alg);
    _mav_put_uint8_t(buf, 35, dvb_pr);
    _mav_put_uint8_t(buf, 36, beacon_feed_volt);
    _mav_put_uint8_t(buf, 37, beacon_22k);
    _mav_put_uint8_t(buf, 38, beacon_period);
    _mav_put_uint8_t(buf, 39, beacon_rng);
    _mav_put_uint8_t(buf, 40, radio_feed_volt);
    _mav_put_uint8_t(buf, 41, radio_22k);
    _mav_put_uint8_t(buf, 42, radio_period);
    _mav_put_uint8_t(buf, 43, radio_roll);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BEACON_REQUEST, buf, MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_CRC);
#else
    mavlink_beacon_request_t packet;
    packet.dvb_freq = dvb_freq;
    packet.dvb_symb = dvb_symb;
    packet.dvb_rng = dvb_rng;
    packet.beacon_freq = beacon_freq;
    packet.radio_freq = radio_freq;
    packet.radio_symb = radio_symb;
    packet.radio_scan_rng = radio_scan_rng;
    packet.cmd = cmd;
    packet.dvb_feed_volt = dvb_feed_volt;
    packet.dvb_22k = dvb_22k;
    packet.dvb_period = dvb_period;
    packet.dvb_id = dvb_id;
    packet.dvb_mcod = dvb_mcod;
    packet.dvb_roll = dvb_roll;
    packet.dvb_std = dvb_std;
    packet.dvb_alg = dvb_alg;
    packet.dvb_pr = dvb_pr;
    packet.beacon_feed_volt = beacon_feed_volt;
    packet.beacon_22k = beacon_22k;
    packet.beacon_period = beacon_period;
    packet.beacon_rng = beacon_rng;
    packet.radio_feed_volt = radio_feed_volt;
    packet.radio_22k = radio_22k;
    packet.radio_period = radio_period;
    packet.radio_roll = radio_roll;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BEACON_REQUEST, (const char *)&packet, MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_CRC);
#endif
}

/**
 * @brief Send a beacon_request message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_beacon_request_send_struct(mavlink_channel_t chan, const mavlink_beacon_request_t* beacon_request)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_beacon_request_send(chan, beacon_request->cmd, beacon_request->dvb_feed_volt, beacon_request->dvb_22k, beacon_request->dvb_period, beacon_request->dvb_id, beacon_request->dvb_freq, beacon_request->dvb_symb, beacon_request->dvb_rng, beacon_request->dvb_mcod, beacon_request->dvb_roll, beacon_request->dvb_std, beacon_request->dvb_alg, beacon_request->dvb_pr, beacon_request->beacon_feed_volt, beacon_request->beacon_22k, beacon_request->beacon_period, beacon_request->beacon_freq, beacon_request->beacon_rng, beacon_request->radio_feed_volt, beacon_request->radio_22k, beacon_request->radio_period, beacon_request->radio_freq, beacon_request->radio_symb, beacon_request->radio_scan_rng, beacon_request->radio_roll);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BEACON_REQUEST, (const char *)beacon_request, MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_CRC);
#endif
}

#if MAVLINK_MSG_ID_BEACON_REQUEST_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This varient of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_beacon_request_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint8_t cmd, uint8_t dvb_feed_volt, uint8_t dvb_22k, uint8_t dvb_period, uint8_t dvb_id, float dvb_freq, uint32_t dvb_symb, uint32_t dvb_rng, uint8_t dvb_mcod, uint8_t dvb_roll, uint8_t dvb_std, uint8_t dvb_alg, uint8_t dvb_pr, uint8_t beacon_feed_volt, uint8_t beacon_22k, uint8_t beacon_period, float beacon_freq, uint8_t beacon_rng, uint8_t radio_feed_volt, uint8_t radio_22k, uint8_t radio_period, float radio_freq, uint32_t radio_symb, uint16_t radio_scan_rng, uint8_t radio_roll)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_float(buf, 0, dvb_freq);
    _mav_put_uint32_t(buf, 4, dvb_symb);
    _mav_put_uint32_t(buf, 8, dvb_rng);
    _mav_put_float(buf, 12, beacon_freq);
    _mav_put_float(buf, 16, radio_freq);
    _mav_put_uint32_t(buf, 20, radio_symb);
    _mav_put_uint16_t(buf, 24, radio_scan_rng);
    _mav_put_uint8_t(buf, 26, cmd);
    _mav_put_uint8_t(buf, 27, dvb_feed_volt);
    _mav_put_uint8_t(buf, 28, dvb_22k);
    _mav_put_uint8_t(buf, 29, dvb_period);
    _mav_put_uint8_t(buf, 30, dvb_id);
    _mav_put_uint8_t(buf, 31, dvb_mcod);
    _mav_put_uint8_t(buf, 32, dvb_roll);
    _mav_put_uint8_t(buf, 33, dvb_std);
    _mav_put_uint8_t(buf, 34, dvb_alg);
    _mav_put_uint8_t(buf, 35, dvb_pr);
    _mav_put_uint8_t(buf, 36, beacon_feed_volt);
    _mav_put_uint8_t(buf, 37, beacon_22k);
    _mav_put_uint8_t(buf, 38, beacon_period);
    _mav_put_uint8_t(buf, 39, beacon_rng);
    _mav_put_uint8_t(buf, 40, radio_feed_volt);
    _mav_put_uint8_t(buf, 41, radio_22k);
    _mav_put_uint8_t(buf, 42, radio_period);
    _mav_put_uint8_t(buf, 43, radio_roll);

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BEACON_REQUEST, buf, MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_CRC);
#else
    mavlink_beacon_request_t *packet = (mavlink_beacon_request_t *)msgbuf;
    packet->dvb_freq = dvb_freq;
    packet->dvb_symb = dvb_symb;
    packet->dvb_rng = dvb_rng;
    packet->beacon_freq = beacon_freq;
    packet->radio_freq = radio_freq;
    packet->radio_symb = radio_symb;
    packet->radio_scan_rng = radio_scan_rng;
    packet->cmd = cmd;
    packet->dvb_feed_volt = dvb_feed_volt;
    packet->dvb_22k = dvb_22k;
    packet->dvb_period = dvb_period;
    packet->dvb_id = dvb_id;
    packet->dvb_mcod = dvb_mcod;
    packet->dvb_roll = dvb_roll;
    packet->dvb_std = dvb_std;
    packet->dvb_alg = dvb_alg;
    packet->dvb_pr = dvb_pr;
    packet->beacon_feed_volt = beacon_feed_volt;
    packet->beacon_22k = beacon_22k;
    packet->beacon_period = beacon_period;
    packet->beacon_rng = beacon_rng;
    packet->radio_feed_volt = radio_feed_volt;
    packet->radio_22k = radio_22k;
    packet->radio_period = radio_period;
    packet->radio_roll = radio_roll;

    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_BEACON_REQUEST, (const char *)packet, MAVLINK_MSG_ID_BEACON_REQUEST_MIN_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_LEN, MAVLINK_MSG_ID_BEACON_REQUEST_CRC);
#endif
}
#endif

#endif

// MESSAGE BEACON_REQUEST UNPACKING


/**
 * @brief Get field cmd from beacon_request message
 *
 * @return  Request the params of beacon at dvb/beacon/radio mode.
 */
static inline uint8_t mavlink_msg_beacon_request_get_cmd(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  26);
}

/**
 * @brief Get field dvb_feed_volt from beacon_request message
 *
 * @return  dvb feed volt.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_feed_volt(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  27);
}

/**
 * @brief Get field dvb_22k from beacon_request message
 *
 * @return  dvb 22k.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_22k(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  28);
}

/**
 * @brief Get field dvb_period from beacon_request message
 *
 * @return  dvb period.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_period(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  29);
}

/**
 * @brief Get field dvb_id from beacon_request message
 *
 * @return  dvb period.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_id(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  30);
}

/**
 * @brief Get field dvb_freq from beacon_request message
 *
 * @return  dvb frequency(ka.MHz).
 */
static inline float mavlink_msg_beacon_request_get_dvb_freq(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  0);
}

/**
 * @brief Get field dvb_symb from beacon_request message
 *
 * @return  dvb symbol rate.
 */
static inline uint32_t mavlink_msg_beacon_request_get_dvb_symb(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  4);
}

/**
 * @brief Get field dvb_rng from beacon_request message
 *
 * @return  dvb range.
 */
static inline uint32_t mavlink_msg_beacon_request_get_dvb_rng(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  8);
}

/**
 * @brief Get field dvb_mcod from beacon_request message
 *
 * @return  dvb mode code.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_mcod(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  31);
}

/**
 * @brief Get field dvb_roll from beacon_request message
 *
 * @return  dvb roll.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_roll(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  32);
}

/**
 * @brief Get field dvb_std from beacon_request message
 *
 * @return  dvb standard code.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_std(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  33);
}

/**
 * @brief Get field dvb_alg from beacon_request message
 *
 * @return  dvb algorithm.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_alg(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  34);
}

/**
 * @brief Get field dvb_pr from beacon_request message
 *
 * @return  dvb punch rate.
 */
static inline uint8_t mavlink_msg_beacon_request_get_dvb_pr(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  35);
}

/**
 * @brief Get field beacon_feed_volt from beacon_request message
 *
 * @return  beacon feed volt.
 */
static inline uint8_t mavlink_msg_beacon_request_get_beacon_feed_volt(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  36);
}

/**
 * @brief Get field beacon_22k from beacon_request message
 *
 * @return  beacon 22k.
 */
static inline uint8_t mavlink_msg_beacon_request_get_beacon_22k(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  37);
}

/**
 * @brief Get field beacon_period from beacon_request message
 *
 * @return  beacon period.
 */
static inline uint8_t mavlink_msg_beacon_request_get_beacon_period(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  38);
}

/**
 * @brief Get field beacon_freq from beacon_request message
 *
 * @return  beacon frequency(ka.MHz).
 */
static inline float mavlink_msg_beacon_request_get_beacon_freq(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  12);
}

/**
 * @brief Get field beacon_rng from beacon_request message
 *
 * @return  beacon range.
 */
static inline uint8_t mavlink_msg_beacon_request_get_beacon_rng(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  39);
}

/**
 * @brief Get field radio_feed_volt from beacon_request message
 *
 * @return  radio feed volt.
 */
static inline uint8_t mavlink_msg_beacon_request_get_radio_feed_volt(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  40);
}

/**
 * @brief Get field radio_22k from beacon_request message
 *
 * @return  radio 22k.
 */
static inline uint8_t mavlink_msg_beacon_request_get_radio_22k(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  41);
}

/**
 * @brief Get field radio_period from beacon_request message
 *
 * @return  radio period.
 */
static inline uint8_t mavlink_msg_beacon_request_get_radio_period(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  42);
}

/**
 * @brief Get field radio_freq from beacon_request message
 *
 * @return  radio frequency(ka.MHz).
 */
static inline float mavlink_msg_beacon_request_get_radio_freq(const mavlink_message_t* msg)
{
    return _MAV_RETURN_float(msg,  16);
}

/**
 * @brief Get field radio_symb from beacon_request message
 *
 * @return  radio symbol rate.
 */
static inline uint32_t mavlink_msg_beacon_request_get_radio_symb(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint32_t(msg,  20);
}

/**
 * @brief Get field radio_scan_rng from beacon_request message
 *
 * @return  radio scan range.
 */
static inline uint16_t mavlink_msg_beacon_request_get_radio_scan_rng(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint16_t(msg,  24);
}

/**
 * @brief Get field radio_roll from beacon_request message
 *
 * @return  radio roll.
 */
static inline uint8_t mavlink_msg_beacon_request_get_radio_roll(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  43);
}

/**
 * @brief Decode a beacon_request message into a struct
 *
 * @param msg The message to decode
 * @param beacon_request C-struct to decode the message contents into
 */
static inline void mavlink_msg_beacon_request_decode(const mavlink_message_t* msg, mavlink_beacon_request_t* beacon_request)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    beacon_request->dvb_freq = mavlink_msg_beacon_request_get_dvb_freq(msg);
    beacon_request->dvb_symb = mavlink_msg_beacon_request_get_dvb_symb(msg);
    beacon_request->dvb_rng = mavlink_msg_beacon_request_get_dvb_rng(msg);
    beacon_request->beacon_freq = mavlink_msg_beacon_request_get_beacon_freq(msg);
    beacon_request->radio_freq = mavlink_msg_beacon_request_get_radio_freq(msg);
    beacon_request->radio_symb = mavlink_msg_beacon_request_get_radio_symb(msg);
    beacon_request->radio_scan_rng = mavlink_msg_beacon_request_get_radio_scan_rng(msg);
    beacon_request->cmd = mavlink_msg_beacon_request_get_cmd(msg);
    beacon_request->dvb_feed_volt = mavlink_msg_beacon_request_get_dvb_feed_volt(msg);
    beacon_request->dvb_22k = mavlink_msg_beacon_request_get_dvb_22k(msg);
    beacon_request->dvb_period = mavlink_msg_beacon_request_get_dvb_period(msg);
    beacon_request->dvb_id = mavlink_msg_beacon_request_get_dvb_id(msg);
    beacon_request->dvb_mcod = mavlink_msg_beacon_request_get_dvb_mcod(msg);
    beacon_request->dvb_roll = mavlink_msg_beacon_request_get_dvb_roll(msg);
    beacon_request->dvb_std = mavlink_msg_beacon_request_get_dvb_std(msg);
    beacon_request->dvb_alg = mavlink_msg_beacon_request_get_dvb_alg(msg);
    beacon_request->dvb_pr = mavlink_msg_beacon_request_get_dvb_pr(msg);
    beacon_request->beacon_feed_volt = mavlink_msg_beacon_request_get_beacon_feed_volt(msg);
    beacon_request->beacon_22k = mavlink_msg_beacon_request_get_beacon_22k(msg);
    beacon_request->beacon_period = mavlink_msg_beacon_request_get_beacon_period(msg);
    beacon_request->beacon_rng = mavlink_msg_beacon_request_get_beacon_rng(msg);
    beacon_request->radio_feed_volt = mavlink_msg_beacon_request_get_radio_feed_volt(msg);
    beacon_request->radio_22k = mavlink_msg_beacon_request_get_radio_22k(msg);
    beacon_request->radio_period = mavlink_msg_beacon_request_get_radio_period(msg);
    beacon_request->radio_roll = mavlink_msg_beacon_request_get_radio_roll(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_BEACON_REQUEST_LEN? msg->len : MAVLINK_MSG_ID_BEACON_REQUEST_LEN;
        memset(beacon_request, 0, MAVLINK_MSG_ID_BEACON_REQUEST_LEN);
    memcpy(beacon_request, _MAV_PAYLOAD(msg), len);
#endif
}
